/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/container
// Copyright (c) 2014.  All Rights Reserved
//
// File:		AETStringWChar.inl
// Author:		Gianluca Belardelli
// Date:		21/12/2013
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AETSTRINGWCHAR_INL_
#define _AETSTRINGWCHAR_INL_

#define DEFAULT_CAPACITY	32

AE_FORCEINLINE AETString<wchar_t>::AETString( void )
{
	m_lpString = new char[DEFAULT_CAPACITY];
	m_uiCapacity = DEFAULT_CAPACITY;
	m_uiLen = 0;
}

AE_FORCEINLINE AETString<wchar_t>::AETString( const wchar_t *lpStr )
{
	int nLen = strlen( lpStr );

	if( nLen < DEFAULT_CAPACITY )
	{
		m_lpString = new char[DEFAULT_CAPACITY];
		m_uiCapacity = DEFAULT_CAPACITY;
		m_uiLen = nLen;
	}
	else
	{
		m_uiLen = nLen;
		nLen = AE_NEXT_MULTIPLE_OF( DEFAULT_CAPACITY, nLen );
		m_uiCapacity = nLen;
		m_lpString = new char[ nLen ];
	}

	strcpy_s( m_lpString, nLen, lpStr );
}

AE_FORCEINLINE AETString<wchar_t>::AETString( AETString<char> )
{
}

AE_FORCEINLINE AETString<wchar_t>::AETString( AEUINT32 uiCapacity )
{
	m_lpString = new char[uiCapacity];
	m_uiCapacity = uiCapacity;
	m_uiLen = 0;
}

AE_FORCEINLINE AETString<wchar_t>::AETString( AETString &copy )
{
}

AE_FORCEINLINE AETString<wchar_t>::~AETString( void )
{
	delete [] m_lpString;
}

AE_FORCEINLINE AETString<wchar_t> &AETString<wchar_t>::ToUpper( void )
{
	return *this;
}

AE_FORCEINLINE AETString<wchar_t> &AETString<wchar_t>::ToLower( void )
{
	return *this;
}

AE_FORCEINLINE AETString<wchar_t> &AETString<wchar_t>::Trim( void )
{
	
	return LTrim().RTrim();
}

AE_FORCEINLINE AETString<wchar_t> &AETString<wchar_t>::LTrim( void )
{
	return *this;
}

AE_FORCEINLINE AETString<wchar_t> &AETString<wchar_t>::RTrim( void )
{
	return *this;
}

AE_FORCEINLINE void AETString<wchar_t>::Clear( void )
{
	m_uiLen = 0;
}

AE_FORCEINLINE AEUINT32 AETString<wchar_t>::GetLength( void ) const
{
	return m_uiLen;
}

AE_FORCEINLINE bool AETString<wchar_t>::IsEmpty( void ) const
{
	return m_uiLen == 0;
}

AE_FORCEINLINE void AETString<wchar_t>::SetCapacity( AEUINT32 uiCapacity )
{
}


#endif // _AETSTRINGWCHAR_INL_
